﻿@{
    Layout = "_LayoutMobile";
    ViewBag.Title = "首页";
}
@section header {
    <style>
        #app {
            padding-top: 0;
        }
        .van-grid {
            background: #fff;
            margin: 5px;
            padding: 10px 0;
            position: relative;
            border-radius: 5px;
            box-shadow: 0 2px 5px #ddd;
            z-index: 999;
        }
    </style>
}
@* <van-nav-bar title="首页" :fixed="true">
</van-nav-bar> *@
<van-image width="100%" fit="cover" src="/img/banner.jpg"></van-image>
<van-grid :gutter="10">
    <van-grid-item :key="1" icon="/img/order_active.png" text="加工订单" url="@Url.Action("MobileList","Machining")"></van-grid-item>
    <van-grid-item :key="1" icon="/img/customer.png" text="客户信息" url="@Url.Action("MobileList","Partner")"></van-grid-item>
    <van-grid-item :key="1" icon="/img/ys_active.png" text="应收款" url="@Url.Action("MobileList","FinanceRecvDue")"></van-grid-item>
    <van-grid-item :key="1" icon="/img/sk_active.png" text="收款单" url="@Url.Action("MobileList","FinanceRecv")"></van-grid-item>
</van-grid>
@section footer {
    <script type="text/javascript">
        var modelJson={};
        var modelData = $.extend(modelJson, {});
        var pageApp = new Vue({
             el: '#app',
                data: {
                    active:'home',
                    model:modelData,
                },
                methods: {
                },
                filters: {
                    formatDate: function (val) {
                        return utils.formatDate(val, 'yyyy-MM-dd');
                    },
                },
        });
        $(function () {
            if(!isMobile())
            {
                    window.location.href = '@(Url.Action("Index", "Home"))';
            }
        });

        function isMobile() {
          const regExp = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i;
          return regExp.test(navigator.userAgent);
        }
    </script>
}

